package com.songcha.library_common.helper

import android.app.Dialog
import android.content.Context
import android.view.Gravity
import com.songcha.library_common.ui.dialog.CustomDialog
import com.songcha.library_common.util.dp2px

class PermissionTipHelper {
    companion object{
        @JvmStatic
        fun showPermissionTip(context: Context,tip:String):Dialog{
            val db = CustomDialog.Companion.Builder(context)
            db.setDialogTitle("")
                .setDialogMsg(tip)
                .setGravity(Gravity.TOP)
                .setAnim(com.songcha.library_common.R.style.dialogTopSlideWindowAnim)
                .setWidth(340.dp2px())
                .setHeight(60.dp2px())
                .setRadius(10f.dp2px())
                .setShowBtn(false)
            val dialog = db.create()
            dialog.show()
            return dialog
        }
    }

}